"use strict";
cc._RF.push(module, '6062bMAB2RNS6vgbB+eHKmu', 'CameraManager');
// scripts/CameraManager.js

"use strict";

var e = require;
var t = module;
window.CameraManager = {
  Instance: null
};
cc.Class({
  "extends": cc.Component,
  properties: {
    CameraTarget: cc.Node,
    IsSyncTargetHeight: {
      type: Boolean,
      "default": !1
    },
    HeightOffset: 0,
    FollowOffset: {
      type: cc.v3,
      "default": cc.v3(0, 0, 0)
    }
  },
  onLoad: function onLoad() {
    CameraManager.Instance = this;
  },
  lateUpdate: function lateUpdate() {
    if (this.CameraTarget.parent && LevelManager.Instance.AllowAvatarControllerMove) {
      var e;
      if (this.IsSyncTargetHeight) this.node.position = this.CameraTarget.position.add(this.FollowOffset);else {
        e = cc.v3(this.CameraTarget.x, this.HeightOffset, this.CameraTarget.z);
        this.node.position = e.add(this.FollowOffset);
      }
    }
  }
});

cc._RF.pop();